home *** CD-ROM | disk | FTP | other *** search
/ Web Designer 98 (Professional) / WebDesigner 1.0.iso / cgi2 / fly_tar.z / fly_tar / fly / examples / cgi-perl-example.pl next >
Encoding:
Perl Script  |  1997-01-21  |  751 b   |  32 lines

  1. #!/usr/local/bin/perl
  2.  
  3. print "Content-type: image/gif\n\n";
  4.  
  5. $flyprog = "/usr/local/web/bin/fly";
  6.  
  7. $infile = "/tmp/fly.$$";
  8.  
  9. open(FLY,"> $infile");
  10. print FLY "new\n";
  11. print FLY "size 256,256\n";
  12. print FLY "fill 1,1,255,255,255\n";
  13. print FLY "arc 128,128,180,180,0,360,0,0,0\n";
  14. print FLY "fill 128,128,255,255,0\n";
  15. print FLY "arc 128,128,120,120,0,180,0,0,0\n";
  16. print FLY "arc 96,96,10,10,0,360,0,0,0\n";
  17. print FLY "arc 160,96,10,10,0,360,0,0,0\n";
  18. print FLY "fill 96,96,0,0,0\n";
  19. print FLY "fill 160,96,0,0,0\n";
  20. print FLY "string 0,0,0,10,240,giant,Hello, World!\n";
  21. print FLY "string 0,0,0,100,10,medium,Don't worry, be Happy!\n";
  22.  
  23. close(FLY);
  24.  
  25. open(FOO,"$flyprog -q -i $infile |");
  26. while( <FOO> ) {print;}
  27. close(FOO);
  28.  
  29. unlink($infile);
  30.  
  31. exit(0);
  32.